<!--
 * @Description: 
 * @Date: 2024-05-06 14:09:10
 * @LastEditTime: 2024-05-06 14:32:04
-->
<template>
  <div class="modal-wrapper" v-if="visible" @click.self="handlerClickBg">
    <div class="default-dialog">
      <h3>宗营镇镇情简介</h3>
    </div>
  </div>
</template>

<script>
export default {
  name: "profileDialog",
  props: {
    visible: {
      default: false,
      type: Boolean,
    },
  },
  methods: {
    handlerClickBg() {
      this.$emit("update:visible", false);
    },
  },
};
</script>

<style lang="scss" scoped>
.modal-wrapper {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 100;

  // 默认样式
  .default-dialog {
    position: absolute;
    border-radius: 5px;
    background: #062264;
    color: white;
    padding: 10px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 200px;
    min-height: 100px;
    max-height: calc(100% - 100px);
    width: calc(100% - 200px);
    font-size: 20px;
    text-align: center;
    overflow: auto;

    p {
      text-indent: 2em;
    }
  }
}

/* 过渡动画 */
.dialog-enter-active,
.dialog-leave-active {
  transition: all 0.25s ease;
}
.dialog-enter-from,
.dialog-leave-to {
  opacity: 0;
}
</style>
